package com.group.service.impl;

import com.group.mapper.ProductMapper;
import com.group.pojo.ProductCategory;
import com.group.mapper.ProductCategoryMapper;
import com.group.service.ProductCategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author group
 * @since 2021-09-06
 */
@Service
public class ProductCategoryServiceImpl implements ProductCategoryService {

    @Autowired
    private ProductCategoryMapper productCategoryMapper;

    @Override
    public List<ProductCategory> selectProductCategoryList1(ProductCategory productCategory) {
        return productCategoryMapper.selectProductCategoryList1(productCategory);
    }

    @Override
    public boolean addProductCategory1(ProductCategory productCategory) {
        if (productCategoryMapper.addProductCategory1(productCategory)>0){
            return true;
        }else {
            return false;
        }
    }

    @Override
    public boolean deleteProductCategory1(String[] ids) {
        if (productCategoryMapper.deleteProductCategory1(ids)>0){
            return true;
        }else {
            return false;
        }
    }

    @Override
    public boolean updateProductCategory1(ProductCategory productCategory) {
        if (productCategoryMapper.updateProductCategory1(productCategory)>0){
            return true;
        }else {
            return false;
        }
    }
}
